<?php 

include("../JO_02_function.php");
include("../JO_01_configuration.php");
$JO_MySQL = new mysqli( $JO_DB_host, $JO_DB_user, $JO_DB_password, $JO_DB_database );
$JO_MySQL -> query( "SET NAMES 'UTF8'" );
$key=isset($_GET['SO_chude'])?$_GET['SO_chude']:"";
if($key!=''){
$sql='Select * from `rbt` where `rbt`.`delete` is null and `rbt`.`key`='.$key;
		
$result=JO_query($sql);
if($result->num_rows)
$row=$result->fetch_array();

   ?>

<form method="post" action="JO_05_execution.php" target="JO_integration_asynchronous" >

<table>
  <input type="hidden"						name="JO_query"				value="rbt"/>
  <input type="hidden" name="id" value="<?=isset($row['key'])?$row['key']:""?>"   style="width:480px !important"/>
  <tr>
    <th style="vertical-align:middle;width:70px"> <div style="width:60px;float:left">music</div></th>
    <td colspan="3"><div  style="width:100px;float:left;padding-left:0;" id="input">
      <ul class="token-input-list">
        <li class="token-input-token">
          <p id="boc">
            <?=isset($row['music'])?$row['music']:""?>
          </p>
          <input type="hidden" name="log" value="<?=isset($row['log'])?$row['log']:""?>" />
          <input type="hidden" name="music" value="<?=isset($row['music'])?$row['music']:""?>" />
          <span class="token-input-delete-token" onclick="tat('<?=isset($row['music'])?$row['music']:""?>')">×</span> </li>
        <li class="token-input-input-token">
          <input id="token-input-music" type="text" autocomplete="off" style="outline: medium none; width: 30px; display: none;"/>
          <tester style="position: absolute; top: -9999px; left: -9999px; width: auto; font-size: 11px; font-family: tahoma; font-weight: 400; letter-spacing: normal; white-space: nowrap;"></tester>
        </li>
      </ul>
      </div>
      </td>
  </tr>
  <tr>
      <th style="vertical-align:middle;width:60px"> <div style="width:60px;float:left">Note</div>
      </th>
      <td colspan="3"><div  style="width:424px;float:left;padding-left:0">
          <input type="text" name="note" id="note" value="<?=isset($row['note'])?$row['note']:""?>"   style="width:480px !important"/>
        </div></td>
    </tr>
  <!--begin-->
  <tr>
      <th style="vertical-align:middle;width:70px"> <div style="width:60px;float:left">telco</div>
      </th>
      <td colspan="4"><div  style="width:424px;float:left;padding-left:0">
          <input type="text" name="telco" value="<?=isset($row['telco'])?$row['telco']:""?>"   style="width:480px !important;z-index:999"/>
        </div></td>
    </tr>
    <tr>
      <th style="vertical-align:middle;width:70px"> <div style="width:60px;float:left">rbtcode</div>
      </th>
      <td colspan="4"><div  style="width:424px;float:left;padding-left:0">
          <input type="text" name="rbtcode"  value="<?=isset($row['rbtcode'])?$row['rbtcode']:""?>"   style="width:480px !important"/>
        </div></td>
    </tr>
  <!--end-->
  <tbody id="extendcontent" style="display:none;">
    
    <tr>
      <th style="vertical-align:middle;width:60px"> <div style="width:60px;float:left">provider</div>
      </th>
      <td colspan="4"><div  style="width:424px;float:left;padding-left:0">
          <input type="text"  name="provider" value="<?=isset($row['provider'])?$row['provider']:""?>"   style="width:480px !important"/>
        </div></td>
    </tr>
     <tr>
      <th style="vertical-align:middle;width:60px"> <div style="width:60px;float:left">Update</div>
      </th>
      <td colspan="4"><div  style="width:424px;float:left;padding-left:0">

          <label><?=isset($row['update'])?$row['update']:""?></label>
        </div></td>
    </tr>
  </tbody>
  <tr class="trextend">
    <th style="vertical-align:middle;width:70px"> <div style="width:60px;float:left">
        <input  type="button" value="Extend"  id="tab" class="JO_button"   onclick="show();"/>
      </div>
    </th>
    <td width="246px"><input type="submit" value="Submit"  id="submit" class="JO_button"   style="width:240px !important" /></td>
    <td style="padding-left:0 !important"><input type="button" value="Cancel"  id="cancel" class="JO_button"   style="width:240px !important" onClick="move();"/></td>
  </tr>
</table>
</form>
<?php   }if($key==''){?>
<form method="post" action="JO_05_execution.php" target="JO_integration_asynchronous" >
  <table>
    <input type="hidden"						name="JO_query"				value="rbt_add"/>
    <input type="hidden" name="id" value="<?=isset($row['key'])?$row['key']:""?>"   style="width:480px !important"/>
    <tr>
      <th style="vertical-align:middle;width:70px"> <div style="width:60px;float:left" >music</div>
      </th>
      <td colspan="4"><div  style="width:424px;float:left;padding-left:0" onclick="hien_add();">
          <input type="text" name="music" id="music" value="<?=isset($row['music'])?$row['music']:""?>"   style="width:480px !important"  />
        </div>
        </div></td>
    </tr>
    <tr>
        <th style="vertical-align:middle;width:60px"> <div style="width:60px;float:left">Note</div>
        </th>
        <td colspan="3"><div  style="width:424px;float:left;padding-left:0">
           <input type="text" name="note" id="note" value="<?=isset($row['note'])?$row['note']:""?>"   style="width:480px !important"/>
          </div></td>
      </tr>
    <!--begin-->
     <tr >
      <th><div style="width:60px;float:left">RBT code</div></th>
      <td ><div style="width:50px;float:left;margin-top:6px">Viettel</div> 
     	  <input type="text" name="txt_vt" value="<?=isset($row['telco'])?($row['telco']=='VTL8x88'?$row['rbtcode']:''):''?>" style="width:170px"/><br />
          <div style="width:50px;float:left;margin-top:6px">MobiFone</div>
          <input type="text" name="txt_mb" value="<?=isset($row['telco'])?($row['telco']=='VMS8x88'?$row['rbtcode']:''):''?>" style="width:170px"/><br />
          <div style="width:50px;float:left;margin-top:6px">Sfone</div>
         <input type="text"  name="txt_sf" value="<?=isset($row['telco'])?($row['telco']=='SFN8x88'?$row['rbtcode']:''):''?>" style="width:170px"/>
     </td>
     <td>VNMobile&nbsp; <input type="text"  name="txt_vn" value="<?=isset($row['telco'])?($row['telco']=='VNM8x88'?$row['rbtcode']:''):''?>" style="width:170px"/><br />
     	 ViNaFone <input type="text"  name="txt_vin" value="<?=isset($row['telco'])?($row['telco']=='GPC8x88'?$row['rbtcode']:''):''?>" style="width:170px"/><br />
         <div style="width:44px;float:left;margin-top:6px">Beeline</div>
         <input type="text"  name="txt_be" value="<?=isset($row['telco'])?($row['telco']=='BEE8x88'?$row['rbtcode']:''):''?>" style="width:170px"/>
      </td>
  </tr>
    
    <tbody id="extendcontent" style="display:none;">
      <tr>
        <th style="vertical-align:middle;width:60px"> <div style="width:60px;float:left">provider</div>
        </th>
        <td colspan="4"><div  style="width:424px;float:left;padding-left:0">
            <input type="text"  name="Content_I18N" value="<?=isset($row['provider'])?$row['provider']:""?>"   style="width:480px !important"/>
          </div></td>
      </tr>
      
    </tbody>
    <tr class="trextend">
      <th style="vertical-align:middle;width:70px"> <div style="width:60px;float:left">
          <input  type="button" value="Extend"  id="tab" class="JO_button"   onclick="show();"/>
        </div>
      </th>
      <td width="246px"><input type="submit" value="Submit"  id="submit" class="JO_button"   style="width:240px !important" /></td>
      <td style="padding-left:0 !important"><input type="button" value="Cancel"  id="cancel" class="JO_button"   style="width:240px !important" onClick="move2();"/></td>
    </tr>
  </table>
</form>
<?php    }?>
